Page History: MarketData Request
Compare Page Revisions
Page Revision: 2012/09/28 16:09
Subscribing and Unsubscribing to streaming dataSome systems allow the transmission of real-time quote, order, trade, trade volume, open interest, and/or other price information on a subscription basis. A Market Data Request is a general request for market data on specific securities or forex quotes.
A successful Market Data Request returns one or more Market Data messages containing one or more Market Data Entries. Each Market Data Entry is a Bid, an Offer, a Trade associated with a security, the opening, closing, or settlement price of a security, the buyer or seller imbalance for a security, the value of an index, the trading session high price, low price, or the trade volume or open interest in a security. Market Data Entries usually have a price and a quantity associated with them. For example, in an order book environment, requesting just the top of book will result in only two active Market Data Entries at a time – one for the best Bid and one for the best Offer.
For a full book, the Bid and Offer side may each have several Market Data Entries. Each Market Data Entry might represent an aggregate for each price tier, and only one Market Data Entry per side per price would be active at a time. This is referred to as an Aggregated book. Or several Market Data Entries at one price tier could each represent a broker, Market Maker, ECN or Exchange’s quote in a security, or individual orders in a book. This is a Non-Aggregated book. Alternately, a Market Data Entry could represent a completed trade in a security, the value of an index, the opening, closing, or settlement price of an instrument, the trading session high price, low price, or VWAP, or the volume traded or open interest in a security.
Subscription TypesA Snapshot causes the current state of the market to be sent. A Snapshot + Updates causes the current state of the market to be sent, and any updates as they occur, until the client requests that the Snapshot + Updates be disabled.
When Snapshot + Updates is requested, updates may be full or incremental:
Full Refresh: This mode is optimized to trade off increased bandwidth for simplicity in processing and is intended for requests on only a few instruments. Each FIX Market Data message in response to the request will contain the complete data requested for one instrument. If more than just the top of book is requested, this means that both sides, and all price tiers, must be reported in that Market Data message.
Incremental Refresh: This mode is optimized for handling requests for many instruments while conserving bandwidth. Each Market Data Entry is assigned an MDEntryID unique among all other active entries, and several incremental updates of entries for different instruments can be included in one FIX Market Data message.
Message DictionaryTag | Field Name | Req'd | Comments |
---|
| Standard Header | Y | MsgType = V |
262 | MDReqID | Y | Must be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2). |
263 | SubscriptionRequestType | Y | SubcriptionRequestType indicates to the other party what type of response is expected. A snapshot request only asks for current information. A subscribe request asks for updates as the status changes. Unsubscribe will cancel any future update messages from the counter party. |
264 | MarketDepth | Y | Depth of market for Book Snapshot |
265 | MDUpdateType | N | Specifies the type of Market Data update. 0=Full Refresh, 1=Incremental Refresh, etc... |
266 | AggregatedBook | N | Specifies whether or not book entries should be aggregated. |
286 | OpenCloseSettlFlag | N | Not Used. Can be used to clarify a request if MDEntryType = Opening Price(4), Closing Price(5), or Settlement Price(6). |
267 | NoMDEntryTypes | Y | Number of MDEntryType fields requested. |
269 | MDEntryType | Y | Must be the first field in this repeating group. This is a list of all the types of Market Data Entries that the firm requesting the Market Data is interested in receiving. |
146 | NoRelatedSym | Y | Number of symbols (instruments) requested. |
| Standard Trailer | Y |
Sample Message
Subscribe to streaming data from a specific market
>> 9/28/2012 3:44:48 PM [FIXMARKETDATAREQUEST] 34=12|49=T4Test|56=test|52=20120928-20:44:48.675|262=md-9/28/2012 3:44:48 PM|263=1|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 12
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:44:48.675
[MDReqID] 262 = md-9/28/2012 3:44:48 PM
[SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F
UnSubscribe from a currently streaming market
>> 9/28/2012 3:45:43 PM [FIXMARKETDATAREQUEST] 34=14|49=T4Test|56=test|52=20120928-20:45:43.119|262=md-9/28/2012 3:45:43 PM|263=2|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 14
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:45:43.119
[MDReqID] 262 = md-9/28/2012 3:45:43 PM
[SubscriptionRequestType] 263 = 2 (DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F
FIX API Home Page.